/*
 * Copyright 2018- The Pixie Authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

syntax = "proto3";

package px.shared.bloomfilterpb;

option go_package = "bloomfilterpb";

// This file contains bloom filters: https://en.wikipedia.org/wiki/Bloom_filter
// They are used check whether elements are present in a given set.
// They have a false negative rate of zero, but there is a false positive rate.

// XXHash64BloomFilter contains a simple serialized bloom filter that uses xxHash
// as its hash function: https://github.com/Cyan4973/xxHash
message XXHash64BloomFilter {
  // The bloom filter contents serialized as bytes.
  bytes data = 1;
  // The number of hashes to apply to convert strings to their byte representation for this bloom
  // filter.
  int32 num_hashes = 2;
}
